#代码一
count = 0
while True:
    username = input('Pleast Entry Your UserName: ')
    password = input('Please Entry Your Password: ')
    count += 1
    if username == 'name' and password == 'pwd':
        print('Login Success')
        break
    elif count < 3:
        print('UserName or PassWord ERROR !!!')
    else:
        print('Error User Name Or Password More Than three Times')
        break




#代码二
count = 0
while count < 3:
    username = input('Pleast Entry Your UserName: ')
    password = input('Please Entry Your Password: ')
    count += 1
    if username != 'user' or password != 'pwd':
        print('Error User Name Or Password More Than three Times') if count == 3 else print('username or password error')
    else:
        print("Login success")
        break


# 改用for循环的话会更简洁一些 
